# Makefile para programas que utilizam a biblioteca light_curve.{h|cpp}
# Tiago Ribeiro

# MACROS

#include /home/tiago/download/galib247/makevars
#HOMEFILE=/Users/tiagoribeiro/Documents
HOMEFILE=/home/tiago
HEALPIX=$(HOMEFILE)/download/Healpix_2.01/src/C/subs
LIBFILE=./
HEADER= ./dataFileReader_v0.1.1/ 
HEADER=$(HOMEFILE)/lib/
DEPLOY=$(HOMEFILE)/prog/bin/Debug/
LIBGA= $(HOMEFILE)/download/galib247/
UFLAG=
CC= g++
LIBS=-L/home/tiago/lib/lib/ -I/home/tiago/lib/gsl/include/ -lgsl -lgslcblas -lm
#LIBS=-lm
ALLLIBS=light_curve.cpp roche.cpp histograma.cpp rtomF.hpp
#incluir UFLAG=-g -DDEBUG para debugar

PROGS = en.lproj/rtom_gsl_fdf_v2.0 cl_new_v.1.0 cl_fit_mc_v0_1 line_prof dgrid_rt imMAP imMAP_mod imMAP_mod_rimg cl_fit_simplex

OBJECTS = histograma.o roche.o light_curve.o dataFileReader.o
OBJ_DPS = $(LIBFILE)histograma.cpp $(LIBFILE)roche.cpp $(LIBFILE)light_curve.cpp $(LIBFILE)dataFileReader_v0.1.1/dataFileReader.cpp

help : 
	@echo incluir UFLAG=\"-g -DDEBUG\" para debugar
	@echo FLAGS alternativas: 
	@echo " -> NO_VERBOSE"
	@echo "--arch i386 ou -m32"
	@echo "Flags para omp (programacao paralela em multicores)"
	@echo CC=g++-4.2 UFLAG='-static -DLINUX -fopenmp'

$(PROGS): % : %.cpp $(OBJECTS)
	$(CC) $(OBJECTS) $@.cpp -o $(DEPLOY)$@ $(USRFLAG) -O3 -I$(HEADER) -I$(LIBFILE) $(LIBS) $(UFLAG)

$(OBJECTS) : $(OBJ_DPS)
	$(CC) -O3 -c $(OBJ_DPS)

clean:
	rm *.o

